/* ==========================================================================
   SUDHOSTING - PROFESSIONAL STYLESHEET (AUDITOR APPROVED)
   ========================================================================== */

/* 
   --------------------------------------------------------------------------
   1. VARIABLES & RESET
   --------------------------------------------------------------------------
*/
:root {
    /* Color Palette - Dark Premium Theme */
    --bg-dark: #0f172a;
    /* Slate 900 */
    --bg-card: #1e293b;
    /* Slate 800 */
    --primary: #3b82f6;
    /* Blue 500 */
    --primary-dark: #2563eb;
    /* Blue 600 */
    --secondary: #64748b;
    /* Slate 500 */
    --accent: #8b5cf6;
    /* Violet 500 */

    /* Text Colors */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    /* Glassmorphism Tokens */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
    --glass-blur: blur(12px);

    /* Dimensions */
    --container-width: 1200px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* 
   --------------------------------------------------------------------------
   2. UTILITIES & TYPOGRAPHY
   --------------------------------------------------------------------------
*/
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.badge {
    display: inline-block;
    padding: 0.5em 1em;
    font-size: 0.8em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.badge-primary {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* 
   --------------------------------------------------------------------------
   3. HEADER & NAVIGATION
   --------------------------------------------------------------------------
*/
header {
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease;
}

nav {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.logo img {
    height: 45px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

#navLinks {
    display: flex;
    gap: 2rem;
    align-items: center;
}

#navLinks a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
}

#navLinks a:not(.btn-login)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

#navLinks a:not(.btn-login):hover {
    color: var(--text-main);
}

#navLinks a:not(.btn-login):hover::after {
    width: 100%;
}

.btn-login {
    background: var(--primary);
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.6);
    background: var(--primary-dark);
}

#hamburgerBtn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

/* 
   --------------------------------------------------------------------------
   4. HERO SECTION (AUDITED)
   --------------------------------------------------------------------------
*/
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    /* Box Alignment: Left */
    justify-content: flex-start;
    padding: 0 5%;
    padding-top: var(--header-height);
    margin-bottom: 4rem;
    /* Background Image: Desktop */
    background: url('../img/imagen-fondo01.jpg') no-repeat center center/cover;
    background-color: var(--bg-dark);
    position: relative;
    /* NO OVERLAY (::before) as requested */
}

/* Hero Content Box */
.hero>div {
    position: relative;
    z-index: 2;
    max-width: 650px;
    /* Text Alignment: Center INSIDE the box */
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    /* Adjusted to fit two lines well */
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-top: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: #cbd5e1;
    /* Replacing --text-muted for specificity */
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* Hero Buttons Wrapper */
.hero-btns {
    display: flex;
    gap: 1.5rem;
    /* Centered buttons to match centered text */
    justify-content: center;
    margin-top: 2rem;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
}

.btn-hero.ver-planes {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    border: 1px solid var(--primary);
}

.btn-hero.ver-planes:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
}

.btn-hero.contactar {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.btn-hero.contactar:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
    transform: translateY(-3px);
}

/* 
   --------------------------------------------------------------------------
   5. DOMAIN SEARCH SECTION (#dominios)
   --------------------------------------------------------------------------
*/
#dominios {
    width: 85%;
    max-width: 1000px;
    margin: -100px auto 5rem;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

.domain-search-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: space-between;
}

#dominios h2 {
    font-size: 1.2rem;
    white-space: nowrap;
    color: var(--text-main);
    margin: 0;
}

#domainForm {
    width: 100%;
    display: flex;
    gap: 1rem;
    align-items: center;
}

#domainInput {
    flex: 1;
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#domainInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

#domainForm button.btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1rem;
}

#domainForm button.btn:hover {
    background: #7c3aed;
}

/* 
   --------------------------------------------------------------------------
   6. CARDS & GRID LAYOUT
   --------------------------------------------------------------------------
*/
section {
    padding: 4rem 0;
    position: relative;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Card Hover Gradient Top Line */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.4);
    border-color: rgba(59, 130, 246, 0.3);
}

.card:hover::before {
    opacity: 1;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.card .price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 2rem;
}

.card .price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.card ul {
    flex-grow: 1;
    margin-bottom: 2rem;
}

.card ul li {
    margin-bottom: 1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.card ul li::before {
    content: '\f00c';
    /* FA Check */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary);
    margin-right: 10px;
}

.card .btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    transition: all 0.3s;
}

.card:hover .btn {
    background: var(--primary);
    color: white;
}

.ti-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary);
}

/* 
   --------------------------------------------------------------------------
   7. FOOTER
   --------------------------------------------------------------------------
*/
footer {
    background: #020617;
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#volverArriba {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

#volverArriba.show {
    opacity: 1;
    visibility: visible;
}

#volverArriba:hover {
    transform: translateY(-5px);
    background: var(--primary-dark);
}

/* 
   --------------------------------------------------------------------------
   8. MEDIA QUERIES (MOBILE OPTIMIZATIONS)
   --------------------------------------------------------------------------
*/
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }

    #dominios {
        width: 90%;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {

    /* Navbar Mobile */
    nav {
        padding: 0 1.5rem;
    }

    #hamburgerBtn {
        display: block;
    }

    #navLinks {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }

    #navLinks.active {
        transform: translateY(0);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    #navLinks a {
        width: 100%;
        text-align: center;
        padding: 0.5rem;
    }

    /* Hero Mobile */
    .hero {
        /* Mobile Background Image */
        background-image: url('../img/banner-home-mobile.jpg') !important;
        background-position: center bottom;
        /* Often better for mobile portraits */
        background-size: cover;
        /* Center content on mobile */
        justify-content: center;
        padding: 0 2rem;
        padding-top: var(--header-height);
    }

    .hero>div {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .btn-hero {
        width: 100%;
    }

    /* Domain Section Mobile Strict */
    #dominios {
        margin-top: -40px !important;
        width: 92% !important;
        padding: 1.5rem !important;
        flex-direction: column;
    }

    .domain-search-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    #domainForm {
        flex-direction: column;
        width: 100%;
    }

    #domainForm button.btn {
        width: 100%;
    }
}

/* Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}