/* Apple Website Clone - CSS Styles */

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

html {
    font-size: 17px;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    scroll-behavior: smooth;
}

body {
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #fff;
    color: #1d1d1f;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.07143;
    letter-spacing: -0.005em;
}

/* Header Navigation */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 22px;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
}

.nav-logo svg {
    width: 16px;
    height: 20px;
    color: #1d1d1f;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    color: #1d1d1f;
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.nav-menu a:hover {
    opacity: 1;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-search,
.nav-bag {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #1d1d1f;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.nav-search:hover,
.nav-bag:hover {
    opacity: 1;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 3px;
}

.nav-toggle span {
    width: 18px;
    height: 1px;
    background-color: #1d1d1f;
    transition: all 0.3s ease;
}

/* Hero Sections */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 580px;
    padding: 60px 22px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-iphone {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.hero-iphone15 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: 56px;
    font-weight: 600;
    line-height: 1.07143;
    letter-spacing: -0.005em;
    margin-bottom: 6px;
}

.hero-subtitle {
    font-size: 28px;
    font-weight: 400;
    line-height: 1.14286;
    letter-spacing: 0.007em;
    margin-bottom: 18px;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 23px;
    border-radius: 980px;
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.23536;
    letter-spacing: -0.022em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #0071e3;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0077ed;
}

.btn-secondary {
    background-color: transparent;
    color: #0071e3;
    border: 1px solid #0071e3;
}

.btn-secondary:hover {
    background-color: #0071e3;
    color: #fff;
}

/* Product Grid */
.product-grid {
    padding: 60px 22px;
    background-color: #f5f5f7;
}

.grid-container {
    max-width: 1024px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}

.product-card {
    background-color: #fff;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-card.large {
    grid-column: span 2;
    min-height: 600px;
}

.product-card.medium {
    min-height: 500px;
}

.product-content {
    z-index: 2;
    position: relative;
}

.product-title {
    font-size: 40px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0em;
    margin-bottom: 8px;
    color: #1d1d1f;
}

.product-subtitle {
    font-size: 21px;
    font-weight: 400;
    line-height: 1.19048;
    letter-spacing: 0.011em;
    margin-bottom: 18px;
    color: #86868b;
}

.product-cta {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.link {
    color: #0071e3;
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.link:hover {
    color: #0077ed;
    text-decoration: underline;
}

.product-image {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    z-index: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom;
}

/* Services Section */
.services {
    padding: 60px 22px;
    background-color: #fff;
}

.services-container {
    max-width: 1024px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-card {
    text-align: center;
    padding: 40px 20px;
}

.service-icon {
    margin-bottom: 20px;
}

.service-icon img {
    width: 56px;
    height: 56px;
}

.service-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1d1d1f;
}

.service-description {
    font-size: 17px;
    line-height: 1.47059;
    color: #86868b;
    margin-bottom: 18px;
}

.service-link {
    color: #0071e3;
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.service-link:hover {
    color: #0077ed;
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: #f5f5f7;
    padding: 40px 22px 20px;
}

.footer-container {
    max-width: 1024px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #d2d2d7;
}

.footer-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #424245;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.33337;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #0071e3;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-legal p {
    font-size: 12px;
    line-height: 1.33337;
    color: #86868b;
}

.footer-legal a {
    color: #424245;
    text-decoration: none;
}

.footer-legal a:hover {
    color: #0071e3;
}

.footer-copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright p {
    font-size: 12px;
    color: #86868b;
}

.footer-links {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #424245;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #0071e3;
}

.footer-country {
    font-size: 12px;
    color: #86868b;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav {
        padding: 0 16px;
    }
    
    .hero {
        padding: 40px 16px;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-subtitle {
        font-size: 24px;
    }
    
    .product-grid {
        padding: 40px 16px;
    }
    
    .product-card.large {
        grid-column: span 1;
    }
    
    .services {
        padding: 40px 16px;
    }
    
    .footer {
        padding: 30px 16px 15px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .hero-subtitle {
        font-size: 21px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .product-title {
        font-size: 32px;
    }
    
    .services-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-copyright {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 16px;
    }
    
    .hero {
        min-height: 400px;
        padding: 30px 16px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 19px;
    }
    
    .product-card {
        padding: 30px 20px;
        min-height: 400px;
    }
    
    .product-title {
        font-size: 28px;
    }
    
    .product-subtitle {
        font-size: 19px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Animations and Transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.product-card,
.service-card {
    animation: fadeInUp 0.8s ease-out;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.btn:focus,
.link:focus,
.nav-menu a:focus,
.nav-search:focus,
.nav-bag:focus {
    outline: 2px solid #0071e3;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-subtitle,
    .product-subtitle,
    .service-description {
        color: #1d1d1f;
    }
    
    .footer-section a,
    .footer-legal a,
    .footer-links a {
        color: #1d1d1f;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}