/* style.css (Outlook-inspired Style - FINAL Logo Size Fix Attempt) */
:root {
    --ms-blue: #0078D4;
    --ms-blue-dark: #005A9E;
    --ms-blue-light: #C7E0F4;
    --ms-gray-10: #faf9f8;
    --ms-gray-20: #f3f2f1;
    --ms-gray-30: #edebe9;
    --ms-gray-90: #605e5c;
    --ms-gray-130: #323130;
    --ms-gray-160: #201f1e;
    --ms-white: #ffffff;
    --ms-red-error: #d83b01;
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --border-radius-small: 2px;
    --border-radius-medium: 4px;
    --shadow-depth-4: 0 1.6px 3.6px 0 rgba(0,0,0,.132), 0 0.3px 0.9px 0 rgba(0,0,0,.108);
    --shadow-depth-8: 0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108);
    --shadow-depth-16: 0 6.4px 14.4px 0 rgba(0,0,0,.132), 0 1.2px 3.6px 0 rgba(0,0,0,.108);
    --container-max-width: 1100px;
    --header-height: 72px; /* Keep increased height */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

body {
    font-family: var(--font-family-primary); background-color: var(--ms-white);
    color: var(--ms-gray-130); line-height: 1.6; font-size: 15px;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

.page-container { display: flex; flex-direction: column; min-height: 100vh; }

/* --- Header --- */
.main-header {
    background-color: var(--ms-white); border-bottom: 1px solid var(--ms-gray-30);
    height: var(--header-height); position: sticky; top: 0; z-index: 1000;
    display: flex; align-items: center;
}

.header-container {
    width: 100%; max-width: var(--container-max-width); margin: 0 auto;
    padding: 0 20px; display: flex; justify-content: space-between; align-items: center;
    height: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-width: none;
    max-height: none;
    text-decoration: none;
}

.logo-image {
    display: block;
    height: 52px !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    object-fit: contain;
}


.main-nav { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-link { color: var(--ms-gray-130); text-decoration: none; padding: 8px 12px; font-size: 0.9rem; font-weight: 500; border-radius: var(--border-radius-small); transition: background-color 0.2s ease, color 0.2s ease; }
.nav-link:hover, .nav-link:focus { background-color: var(--ms-gray-20); color: var(--ms-blue); outline: none; }
.mobile-nav-toggle { display: none; }

/* --- Language Switcher --- */
.language-switcher {
    display: flex;
    align-items: center;
    margin-left: 10px; /* Adjust spacing as needed */
}
.lang-btn {
    background: none;
    border: 1px solid transparent; /* Transparent border to maintain size on hover/active */
    color: var(--ms-gray-90);
    padding: 6px 8px;
    margin-left: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--border-radius-small);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.lang-btn:hover {
    background-color: var(--ms-gray-20);
    color: var(--ms-blue);
}
.lang-btn.active {
    background-color: var(--ms-blue-light);
    color: var(--ms-blue-dark);
    border-color: var(--ms-blue);
    font-weight: 600;
}


/* --- Buttons --- */
.button { display: inline-flex; align-items: center; justify-content: center; font-family: inherit; font-size: 0.9rem; font-weight: 600; padding: 10px 20px; border-radius: var(--border-radius-small); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; min-height: 36px; }
.button-primary { background-color: var(--ms-blue); color: var(--ms-white); border-color: var(--ms-blue); }
.button-primary:hover:not(:disabled), .button-primary:focus:not(:disabled) { background-color: var(--ms-blue-dark); border-color: var(--ms-blue-dark); outline: none; }
.button-outline { background-color: transparent; color: var(--ms-blue); border-color: var(--ms-blue); }
.button-outline:hover, .button-outline:focus { background-color: var(--ms-blue-light); color: var(--ms-blue-dark); border-color: var(--ms-blue); outline: none; }
.button-large { padding: 14px 28px; font-size: 1rem; }
.button-small { padding: 6px 12px; font-size: 0.8rem; min-height: 30px; }
button:disabled { background-color: var(--ms-gray-30); color: var(--ms-gray-90); border-color: var(--ms-gray-30); cursor: not-allowed; }

/* --- Hero Section --- */
.hero-section { background-color: var(--ms-gray-10); padding: 60px 20px; text-align: center; }
.hero-content-container { max-width: var(--container-max-width); margin: 0 auto; }
.hero-text h1 { font-size: 2.5rem; font-weight: 600; color: var(--ms-gray-160); margin-bottom: 16px; line-height: 1.2; }
.hero-text .subtitle { font-size: 1.1rem; color: var(--ms-gray-90); margin-bottom: 32px; max-width: 650px; margin-left: auto; margin-right: auto; }
.hero-form-container { max-width: 700px; margin: 0 auto; }
.search-form-card { background-color: var(--ms-white); padding: 24px; border-radius: var(--border-radius-medium); box-shadow: var(--shadow-depth-8); text-align: left; }
.search-form-card h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 20px; text-align: center; }
.search-box { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-bottom: 16px; }
.input-group { flex-grow: 1; }
#domain-input, #domain-suffix { width: 100%; padding: 10px 12px; font-size: 1rem; border: 1px solid var(--ms-gray-90); border-radius: var(--border-radius-small); height: 40px; font-family: inherit; }
#domain-input:focus, #domain-suffix:focus { border-color: var(--ms-blue); box-shadow: 0 0 0 1px var(--ms-blue); outline: none; }
select#domain-suffix { appearance: none; background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%225%22%20viewBox%3D%220%200%2010%205%22%3E%3Cpath%20fill%3D%22%23605e5c%22%20d%3D%22M0%200l5%205%205-5z%22/%3E%3C/svg%3E'); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.at-symbol-hero { font-size: 1.1rem; color: var(--ms-gray-90); padding: 0 4px; }
.hero-search-button { grid-column: 1 / -1; margin-top: 8px; width: 100%; height: 40px; }
.result-card-hero { margin-top: 16px; padding: 12px; border-radius: var(--border-radius-small); font-size: 0.95rem; text-align: center; min-height: 60px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.result-card-hero.available { background-color: #dff6dd; color: #3c763d; border: 1px solid #d0e9c6;}
.result-card-hero.unavailable { background-color: #f2dede; color: #a94442; border: 1px solid #ebccd1;}
.result-card-hero p { margin: 2px 0; }
.result-card-hero strong { font-weight: 600; }
.result-card-hero .spinner-small { width: 20px; height: 20px; border: 2px solid rgba(0,0,0,.1); border-left-color: var(--ms-blue); border-radius: 50%; animation: spin 0.8s linear infinite; margin-top: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Features Section --- */
.features-section { padding: 60px 20px; background-color: var(--ms-white); }
.features-container { max-width: var(--container-max-width); margin: 0 auto; text-align: center; }
.features-section h2 { font-size: 2rem; font-weight: 600; margin-bottom: 40px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.feature-item { padding: 20px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.feature-icon-unicode { display: inline-block; font-size: 2.5rem; color: var(--ms-blue); margin-bottom: 16px; line-height: 1; }
.feature-item h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.feature-item p { font-size: 0.95rem; color: var(--ms-gray-90); line-height: 1.7; }

/* --- Available Suffixes Section --- */
.available-suffixes-section { padding: 40px 20px; background-color: var(--ms-gray-10); }
.suffixes-container { max-width: var(--container-max-width); margin: 0 auto; text-align: center; }
.available-suffixes-section h2 { font-size: 1.8rem; font-weight: 600; margin-bottom: 8px;}
.suffixes-subtitle { color: var(--ms-gray-90); margin-bottom: 24px; }
.domain-cards-wrapper { max-height: 180px; overflow-y: auto; padding: 8px; margin-bottom: 16px; }
.domain-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.loading-placeholder-cards { padding: 20px; color: var(--ms-gray-90); }
.domain-card { background-color: var(--ms-white); padding: 12px; border: 1px solid var(--ms-gray-30); border-radius: var(--border-radius-small); font-size: 0.9rem; font-weight: 500; text-align: center; cursor: pointer; transition: box-shadow 0.2s ease, border-color 0.2s ease; min-height: 50px; display: flex; align-items: center; justify-content: center; }
.domain-card:hover, .domain-card:focus { border-color: var(--ms-blue); box-shadow: var(--shadow-depth-4); outline: none; }
.suffixes-footer-note { font-size: 0.85rem; color: var(--ms-gray-90); }

/* --- Pricing Reference Section --- */
.pricing-reference-section { padding: 40px 20px; background-color: var(--ms-white); }
.pricing-container { max-width: 700px; margin: 0 auto; text-align: center; }
.pricing-reference-section h2 { font-size: 1.8rem; font-weight: 600; margin-bottom: 20px; }
.pricing-info p { margin-bottom: 8px; font-size: 1rem; color: var(--ms-gray-90); }
.price-value { color: var(--ms-gray-130); font-weight: 600; }
.discount-note { font-size: 0.9rem; color: var(--ms-blue); margin-top: 16px; }

/* --- Final CTA Section --- */
.final-cta-section { padding: 60px 20px; background-color: var(--ms-blue-light); text-align: center; }
.cta-container { max-width: var(--container-max-width); margin: 0 auto; }
.final-cta-section h2 { font-size: 1.8rem; font-weight: 600; margin-bottom: 24px; color: var(--ms-gray-160); }

/* --- Footer --- */
.main-footer { background-color: var(--ms-gray-20); padding: 30px 20px; color: var(--ms-gray-90); font-size: 0.85rem; margin-top: auto; }
.footer-container { max-width: var(--container-max-width); margin: 0 auto; text-align: center; }
.footer-links { margin-bottom: 12px; }
.footer-links a { color: var(--ms-gray-90); text-decoration: none; margin: 0 10px; transition: color 0.2s ease; }
.footer-links a:hover, .footer-links a:focus { color: var(--ms-blue); text-decoration: underline; }

/* --- Modals --- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; justify-content: center; align-items: center; z-index: 1100; padding: 20px; opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s ease; }
.modal[style*="display: flex"] { opacity: 1; visibility: visible; }
.modal-content { background: var(--ms-white); padding: 24px; border-radius: var(--border-radius-medium); max-width: 500px; width: 100%; box-shadow: var(--shadow-depth-16); transform: scale(0.98); transition: transform 0.2s ease; text-align: left; position: relative; /* Added for close button positioning */ }
.modal[style*="display: flex"] .modal-content { transform: scale(1); }
.modal-content h3 { font-size: 1.4rem; font-weight: 600; color: var(--ms-gray-160); margin-bottom: 16px; text-align: left; }
.modal-body p { color: var(--ms-gray-130); margin-bottom: 12px; font-size: 0.95rem; }
.modal-body strong { font-weight: 600; }
.modal-footnote { display: block; text-align: left; color: var(--ms-gray-90); margin-top: 20px; font-size: 0.8rem; }
.modal-actions { margin-top: 24px; text-align: right; }
.modal-actions .button { margin-left: 8px; }

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--ms-gray-90);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 50%; /* Make it round */
}
.modal-close-btn:hover {
    background-color: var(--ms-gray-20);
}

/* HIDE X on Announcement Modal */
.announcement-modal .modal-close-btn {
    display: none !important;
}

.copy-btn { font-weight: 500; }
.copy-feedback { font-size: 0.85rem; color: var(--ms-blue); margin-top: 8px; text-align: left; }

/* --- Responsive --- */
@media (max-width: 768px) {
     :root { --header-height: 60px; }
    .main-header { height: auto; min-height: var(--header-height); }
    .header-container { flex-wrap: wrap; padding: 10px 15px; position: relative; } /* Added position relative */
    .logo-link { order: 1; } /* Ensure logo is first */
    .logo-image {
        height: 38px !important;
        max-height: calc(var(--header-height) - 12px) !important;
    }

    .language-switcher {
      order: 2; /* Language switcher before toggle on small screens */
      position: absolute; /* Position it relative to header-container */
      right: 60px; /* Space for the toggle button */
      top: 50%;
      transform: translateY(-50%);
    }
    .mobile-nav-toggle {
        display: flex; flex-direction: column; justify-content: space-around;
        width: 30px; height: 24px; background: transparent; border: none;
        cursor: pointer; padding: 0;
        order: 3; /* Toggle button last in the visual row */
        margin-left: 10px; /* Add some space if main-nav items push it */
    }
    .main-nav {
        display: none; flex-direction: column; width: 100%; order: 4; /* Nav items below everything */
        background-color: var(--ms-white); padding: 10px 0;
        border-top: 1px solid var(--ms-gray-30);
        position: absolute; top: 100%; left: 0;
        box-shadow: var(--shadow-depth-8);
    }
    .main-nav.active { display: flex; }
    .nav-link { width: 100%; text-align: left; padding: 12px 20px; }
    #header-register-btn { width: calc(100% - 40px); margin: 10px 20px; }

    .icon-bar { width: 100%; height: 3px; background-color: var(--ms-gray-130); border-radius: 1px; transition: transform 0.3s ease, opacity 0.3s ease; }
    .mobile-nav-toggle[aria-expanded="true"] .icon-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
    .mobile-nav-toggle[aria-expanded="true"] .icon-bar:nth-child(2) { opacity: 0; }
    .mobile-nav-toggle[aria-expanded="true"] .icon-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
    .hero-section { padding: 40px 15px; }
    .hero-text h1 { font-size: 2rem; }
    .hero-text .subtitle { font-size: 1rem; }
    .search-box { grid-template-columns: 1fr; gap: 10px; }
    .at-symbol-hero { display: none; }
    #domain-input, #domain-suffix { grid-column: 1 / -1; }
    .hero-search-button { margin-top: 12px; }
    .features-section h2 { font-size: 1.8rem; }
    .features-grid { grid-template-columns: 1fr; gap: 20px; }
    .available-suffixes-section h2, .pricing-reference-section h2, .final-cta-section h2 { font-size: 1.6rem; }
    .domain-cards { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
    .domain-cards-wrapper { max-height: 200px; }
}

@media (max-width: 480px) {
    .logo-image {
        height: 34px !important;
         max-height: calc(var(--header-height) - 10px) !important;
    }
    .language-switcher {
        right: 50px; /* Adjust for smaller screens if needed */
    }
    .lang-btn {
        padding: 5px 6px;
        font-size: 0.8rem;
    }
    .hero-text h1 { font-size: 1.8rem; }
    .hero-text .subtitle { font-size: 0.95rem; }
    .search-form-card { padding: 20px; }
    .search-form-card h2 { font-size: 1.1rem; }
    #domain-input, #domain-suffix, .hero-search-button { height: 40px; font-size: 0.95rem; }
    .button { padding: 8px 16px; font-size: 0.85rem; }
    .button-large { padding: 12px 24px; }
    .modal-content { padding: 20px; }
    .modal-content h3 { font-size: 1.25rem; }
}