/* 
* Family IT Guy - Main Stylesheet
* Uses Material Design principles with custom brand colors
*/

/* Variables */
:root {
    /* Brand Colors */
    --cool-slate: #1D252D;
    --cool-slate-light: #2D3540;
    --warm-red: #EE2737;
    --warm-red-dark: #d81b2a;
    --pale-blue: #B8DDE1;
    --pale-blue-light: #D1EBF0;
    --it-gold: #FFBF3F;
    --it-gold-light: #FFD473;
    
    /* Neutral Colors */
    --white: #FFFFFF;
    --light-gray: #EBEBE9;
    --medium-gray: #777777;
    --dark-gray: #333333;
    
    /* Fonts */
    --heading-font: 'IBM Plex Serif', serif;
    --body-font: 'DM Sans', sans-serif;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-med: 0.3s ease;
}

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

html, body {
    height: 100%; /* Full height for sticky footer */
}

body {
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--dark-gray);
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column; /* Stack header, content, footer */
}

/* Sticky footer */
.main-content {
    flex: 1 0 auto; /* Grow to fill available space */
}

.footer {
    flex-shrink: 0; /* Prevent footer from shrinking */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--cool-slate);
}

h1 {
    font-size: 2.75rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--space-lg);
    position: relative;
    padding-bottom: var(--space-md);
}

h2:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--warm-red);
}

.text-center h2:after {
    left: 50%;
    transform: translateX(-50%);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--warm-red);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #d81b2a;
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

section {
    padding: var(--space-xxl) 0;
}

/* Enhanced Section Headers */
.section-header-enhanced {
    text-align: center;
    margin-bottom: var(--space-xl);
    position: relative;
    padding-bottom: var(--space-lg);
}

.section-header-enhanced h2 {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    padding-bottom: 0;
}

.section-header-enhanced h2:after {
    width: 80px;
    height: 4px;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
}

.section-subheading {
    font-size: 1.2rem;
    color: var(--medium-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* App Bar */
.app-bar {
    background-color: var(--cool-slate);
    color: var(--white);
    height: 80px; /* Increased from 64px to accommodate larger logo */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.app-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px; /* Increased from 40px (50% larger) */
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-left: var(--space-xl);
}

.main-nav a {
    color: var(--white);
    display: flex;
    align-items: center;
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--pale-blue);
}

.main-nav .material-icons {
    margin-right: var(--space-xs);
}

/* Dropdown Menu */
.has-dropdown {
    position: relative;
}

.has-dropdown .dropdown-icon {
    font-size: 18px;
    margin-left: 4px;
    vertical-align: middle;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--cool-slate);
    min-width: 200px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 200;
    padding: var(--space-sm) 0;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: var(--space-sm) var(--space-lg);
    display: block;
}

.dropdown-menu a:hover {
    background-color: var(--cool-slate-light);
}

.has-dropdown:hover .dropdown-menu {
    display: block !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 24px;
}

/* Hero Section */
.hero {
    background-color: var(--pale-blue);
    padding: calc(80px + var(--space-xxl)) 0 var(--space-xxl); /* Using spacing from original screenshot */
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md); /* Reduced gap to bring elements closer */
    margin: 0; /* Removed top margin to eliminate extra space */
}

.hero-card {
    background-color: var(--white);
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    max-width: 500px;
}

/* Removed the Learn + Protect tagline 
.hero-card h1 + p:after {
    content: "Learn + Protect";
    display: block;
    color: var(--warm-red);
    font-weight: 700;
    margin-top: var(--space-sm);
    font-family: var(--heading-font);
}
*/

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.hero-image {
    flex: 0 0 400px; /* Increased from 300px */
    border-radius: var(--radius-md);
    overflow: hidden;
}

.hero-image img {
    display: block;
    border-radius: var(--radius-md);
    width: 100%;
    height: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-lg);
    height: 40px;
    border-radius: 20px;
    font-family: var(--body-font);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background-color: var(--warm-red);
    color: var(--white);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
    letter-spacing: 0.75px;
    padding: 0 var(--space-xl);
}

.btn-primary:hover {
    background-color: #d81b2a;
    box-shadow: var(--shadow-md);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--cool-slate);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: #f0f0f0;
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--warm-red);
    border: 2px solid var(--warm-red);
}

.btn-outline:hover {
    background-color: var(--warm-red);
    color: var(--white);
}

.btn-outline-secondary {
    background-color: var(--light-gray);
    color: var(--medium-gray);
    border: none;
}

.btn.coming-soon,
.btn-outline.coming-soon {
    pointer-events: none;
    border-radius: 20px;
    padding: 0 var(--space-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--medium-gray);
    font-weight: 500;
    background-color: var(--light-gray);
    border: none;
    opacity: 0.9;
    transition: all var(--transition-med);
}

/* Quick Concerns */
.quick-concerns {
    padding-top: var(--space-xxl);
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0 var(--space-md);
    height: 32px;
    background-color: var(--light-gray);
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--cool-slate);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.chip:hover {
    background-color: var(--pale-blue-light);
    color: var(--cool-slate);
    transform: translateY(-2px);
}

.chip-icon {
    color: var(--warm-red);
    font-size: 20px;
    margin-right: var(--space-xs);
}

/* Cards */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-lg);
}

.card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Quick Win Cards */
.quick-win-card {
    position: relative;
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Enhanced card styles */
.enhanced-card {
    border-top: 4px solid var(--warm-red);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.time-estimate {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--medium-gray);
    margin-bottom: var(--space-md);
}

.time-estimate i {
    font-size: 14px;
    margin-right: 4px;
}

.device-badge {
    position: absolute;
    top: 60px;
    right: 0;
    background-color: var(--warm-red);
    color: white;
    padding: 4px 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px 0 0 4px;
    font-weight: bold;
}

.guide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: var(--space-md) 0;
}

.time-pill, .difficulty-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.time-pill {
    background-color: var(--light-gray);
    color: var(--medium-gray);
}

.difficulty-pill {
    color: var(--white);
}

.difficulty-pill.easy {
    background-color: #4caf50;
}

.difficulty-pill.medium {
    background-color: #ff9800;
}

.difficulty-pill.hard {
    background-color: #f44336;
}

.card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--it-gold);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.quick-win-card:nth-child(1) .card-accent {
    background-color: var(--warm-red);
}
.quick-win-card:nth-child(2) .card-accent {
    background-color: var(--cool-slate);
}
.quick-win-card:nth-child(3) .card-accent {
    background-color: var(--pale-blue);
}
.quick-win-card:nth-child(4) .card-accent {
    background-color: var(--it-gold);
}
.quick-win-card:nth-child(5) .card-accent {
    background-color: #4caf50; /* Green for family balance */
}

.card-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--it-gold);
    color: var(--white);
    border-radius: 50%;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: var(--space-lg);
}

.card-number span {
    padding-top: 1px;  /* Optical alignment */
}

.quick-win-card h3 {
    margin-bottom: var(--space-sm);
}

.quick-win-card p {
    margin-bottom: var(--space-lg);
    color: var(--dark-gray);
}

.quick-win-card .btn {
    margin-top: auto;
}

/* Device Cards */
.device-card {
    display: flex;
    flex-direction: column;
}

.card-header {
    background: linear-gradient(135deg, var(--cool-slate) 0%, var(--cool-slate-light) 100%);
    color: var(--white);
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    align-items: center;
}

.card-header i {
    margin-right: var(--space-sm);
}

.card-body {
    padding: var(--space-xl);
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 200px; /* Fixed height for consistency */
}

.card-body h3 {
    margin-bottom: var(--space-sm);
}

.card-body p {
    margin-bottom: var(--space-xs);
}

.card-body p.coming-soon {
    color: var(--medium-gray);
}

.card-body p.meta {
    font-size: 0.875rem;
    color: var(--medium-gray);
    margin-bottom: var(--space-lg);
}

.card-body .btn {
    margin-top: auto;
}

/* Assessment Banner */
.assessment-banner {
    padding: var(--space-xxl) 0;
}

.assessment-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    position: relative;
    padding: var(--space-xl);
    overflow: hidden;
}

.assessment-accent {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background-color: var(--it-gold);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.assessment-content {
    flex: 1;
    padding-left: var(--space-md);
}

.assessment-action {
    display: flex;
    align-items: center;
}

/* Video Cards */
.video-card {
    display: flex;
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: var(--space-lg);
    transition: box-shadow var(--transition-fast);
}

.video-card:hover {
    box-shadow: var(--shadow-md);
}

.video-thumbnail {
    background-color: var(--cool-slate);
    width: 160px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon {
    color: var(--white);
    font-size: 48px;
}

.video-content {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-content h3 {
    margin-bottom: var(--space-xs);
}

.video-content p {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--medium-gray);
}

.video-action {
    display: flex;
    align-items: center;
    padding: 0 var(--space-lg);
}

/* Newsletter Section */
.newsletter-section {
    background-color: var(--pale-blue);
    padding: var(--space-xxl) 0;
}

.newsletter-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: var(--space-xl);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-form {
    margin-top: var(--space-lg);
}

.form-group {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.form-group input {
    flex: 1;
    height: 40px;
    padding: 0 var(--space-md);
    border: 1px solid #ddd;
    border-radius: 20px;
    font-family: var(--body-font);
}

.form-note {
    font-size: 0.75rem;
    color: var(--medium-gray);
}

/* Footer */
.footer {
    background-color: var(--cool-slate);
    color: var(--white);
    padding: var(--space-xl) 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer a {
    color: var(--white);
    margin-left: var(--space-lg);
}

.footer a:hover {
    color: var(--pale-blue);
}

.social-links {
    display: flex;
    gap: 16px; /* Fixed consistent spacing */
    align-items: center; /* Ensures vertical alignment */
}

.social-icon {
    height: 20px; /* Fixed height for consistent sizing */
    width: auto; /* Maintain aspect ratio */
    display: block;
    transition: opacity 0.2s ease;
}

/* All icons now have consistent sizing */

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px; /* Consistent clickable area */
    width: 32px;
    padding: 0; /* Remove any padding */
}

.social-links a:hover .social-icon {
    opacity: 0.8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--medium-gray);
}

.close-modal:hover {
    color: var(--cool-slate);
}

.modal h2 {
    margin-bottom: var(--space-lg);
}

.modal .form-group {
    margin-bottom: var(--space-md);
    flex-direction: column;
    align-items: flex-start;
}

.modal label {
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.modal input {
    width: 100%;
}

.modal .btn {
    margin-top: var(--space-md);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-card {
    animation: fadeIn 0.6s ease-out;
}

.quick-win-card {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.quick-win-card:nth-child(1) { animation-delay: 0.1s; }
.quick-win-card:nth-child(2) { animation-delay: 0.2s; }
.quick-win-card:nth-child(3) { animation-delay: 0.3s; }
.quick-win-card:nth-child(4) { animation-delay: 0.4s; }
.quick-win-card:nth-child(5) { animation-delay: 0.5s; }

/* Button Ripple Effect */
.btn {
    position: relative;
    overflow: hidden;
}

.btn:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(30, 30);
        opacity: 0;
    }
}

/* Improved form elements */
input[type="email"] {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="email"]:focus {
    border-color: var(--pale-blue);
    box-shadow: 0 0 0 3px rgba(184, 221, 225, 0.3);
    outline: none;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
    }
    
    .hero-image {
        order: -1;
        width: 100%;
        flex: initial;
    }
    
    .assessment-card {
        flex-direction: column;
    }
    
    .assessment-action {
        margin-top: var(--space-lg);
    }
    
    .assessment-accent {
        width: 100%;
        height: 4px;
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
    }
}

@media (max-width: 768px) {
    .app-bar {
        height: 70px; /* Slightly smaller on mobile */
    }
    
    .logo img {
        height: 50px; /* Smaller logo on mobile */
    }
    
    .main-nav {
        display: none;
    }
    
    .main-nav.show {
        display: block;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--cool-slate);
        padding: var(--space-md);
        box-shadow: var(--shadow-md);
    }
    
    .main-nav.show ul {
        flex-direction: column;
    }
    
    .main-nav.show li {
        margin: var(--space-sm) 0;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        background-color: var(--cool-slate-light);
        padding-left: var(--space-lg);
        display: none !important;
    }
    
    .dropdown-menu.show {
        display: block !important;
    }
    
    .has-dropdown:hover .dropdown-menu {
        display: none !important;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }
    
    .footer-links a:first-child {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 var(--space-md); /* Reduce side padding on small screens */
    }
    
    h1 {
        font-size: 2.25rem; /* Adjust heading size for mobile */
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero {
        padding-top: calc(70px + var(--space-xl)); /* Adjust for smaller header */
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .video-card {
        flex-direction: column;
    }
    
    .video-thumbnail {
        width: 100%;
    }
    
    .video-action {
        padding: var(--space-md);
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .btn {
        width: 100%;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .chips-container {
        justify-content: center; /* Center chips on mobile */
    }
    
    .assessment-card {
        padding: var(--space-lg); /* Smaller padding on mobile */
    }
    
    .newsletter-card {
        padding: var(--space-lg); /* Smaller padding on mobile */
    }
}