/* ===================================
   AUTOMATIC HOME CONTROL - Main Styles
   =================================== */

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

:root {
    --primary: #00a8ff;
    --secondary: #0066cc;
    --dark: #0a0e27;
    --darker: #050816;
    --light: #f8f9fa;
    --gray: #6c757d;
    --accent: #00d9ff;
    --success: #28a745;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--light);
    background: var(--darker);
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */

header {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 168, 255, 0.2);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.logo-tagline {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--light);
    opacity: 0.8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-left: 0.15rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===================================
   HERO SECTION
   =================================== */

/* Full-height hero for home page only */
.hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 3rem;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    position: relative;
    overflow: hidden;
}

/* Full-height hero for home page */
.hero.hero-home {
    min-height: 100vh;
    padding: 6rem 2rem 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 168, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 102, 204, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 1;
}

/* Hero Section Icons */
.hero-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    display: block;
    filter: invert(1);
    opacity: 0.8;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}


.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

/* Larger h1 for home page hero */
.hero.hero-home h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(248, 249, 250, 0.8);
    margin-bottom: 1.5rem;
}

/* Larger text for home page hero */
.hero.hero-home p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 168, 255, 0.3);
}

.cta-button:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 255, 0.4);
}

/* ===================================
   SECTIONS
   =================================== */

section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary);
}

section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
    color: rgba(248, 249, 250, 0.8);
}

/* ===================================
   CARDS & GRID
   =================================== */

.services-grid,
.systems-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.service-card,
.system-card {
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(0, 168, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
}

/* System/Service Card Icons */
.system-icon,
.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: block;
    filter: invert(1);
    opacity: 0.9;
    transition: all 0.3s;
}

.system-card:hover .system-icon,
.service-card:hover .service-icon {
    opacity: 1;
    transform: scale(1.1);
}


.service-card:hover,
.system-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 168, 255, 0.2);
}

.service-card h3,
.system-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.service-card p,
.system-card p {
    color: rgba(248, 249, 250, 0.8);
    margin-bottom: 1rem;
}

.service-card ul,
.system-card ul {
    list-style: none;
    margin-top: 1rem;
}

.service-card ul li,
.system-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: rgba(248, 249, 250, 0.7);
}

.service-card ul li::before,
.system-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.learn-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.learn-more:hover {
    color: var(--accent);
}

/* ===================================
   ABOUT SECTION
   =================================== */

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text {
    color: rgba(248, 249, 250, 0.8);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-highlights {
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(0, 168, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
}

.about-highlights h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.about-highlights ul {
    list-style: none;
}

.about-highlights ul li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: rgba(248, 249, 250, 0.8);
}

.about-highlights ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* ===================================
   NEXT STEPS / CTA SECTION
   =================================== */

.next-steps {
    background: rgba(10, 14, 39, 0.4);
    padding: 4rem 2rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    background: rgba(10, 14, 39, 0.8);
    border: 1px solid rgba(0, 168, 255, 0.3);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.step-card p {
    color: rgba(248, 249, 250, 0.7);
    margin-bottom: 1.5rem;
}

.step-card .cta-button {
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
}

/* ===================================
   CONTACT FORM
   =================================== */

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.contact-info p {
    font-size: 1.25rem;
    color: rgba(248, 249, 250, 0.8);
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.contact-form {
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(0, 168, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--light);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(5, 8, 22, 0.6);
    border: 1px solid rgba(0, 168, 255, 0.3);
    border-radius: 6px;
    color: var(--light);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-button:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

/* ===================================
   NEWS/BLOG
   =================================== */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.news-article {
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(0, 168, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
}

.news-article:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.news-date {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-article h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.news-article p {
    color: rgba(248, 249, 250, 0.8);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ===================================
   FOOTER
   =================================== */

footer {
    background: var(--dark);
    border-top: 1px solid rgba(0, 168, 255, 0.2);
    padding: 3rem 2rem 1rem;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(248, 249, 250, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 168, 255, 0.1);
    color: var(--gray);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 14, 39, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        display: none;
        border-bottom: 1px solid rgba(0, 168, 255, 0.2);
    }

    .nav-links.active {
        display: flex;
    }

    .hero {
        min-height: 50vh;
        padding: 6rem 1.5rem 2rem;
    }

    .hero.hero-home {
        min-height: 80vh;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero.hero-home h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero.hero-home p {
        font-size: 1.1rem;
    }

    section h2 {
        font-size: 1.75rem;
    }

    section {
        padding: 2rem 1.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .services-grid,
    .systems-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero.hero-home h1 {
        font-size: 2rem;
    }

    section {
        padding: 2rem 1rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    .service-card,
    .system-card,
    .news-article {
        padding: 1.5rem;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}

.hidden {
    display: none;
}
